1. Field
One or more embodiments of the following description relate to a method and apparatus for ray tracing, and more particularly, to a method and apparatus for performing traversal and an intersection test of a ray.
2. Description of the Related Art
Three-dimensional (3D) rendering is an image process for synthesizing data of a 3D object into an image that is observed at a given viewpoint of a camera.
As one example of a rendering method, a rasterization method that generates an image while projecting a 3D object onto a screen may be employed. As another example of a rendering method, a ray tracing method that generates an image by tracing a path of light incident along a ray that is emitted from a viewpoint of a camera towards each of pixels of an image.
Among the preceding rendering methods, the ray tracing method typically generates a high quality image by taking into account physical properties of light such as reflection, refraction, transmission, and the like. However, a significantly large amount of calculation may be necessary for ray tracing and thus, the ray tracing method may not perform rendering at a high speed.
Each of traversal of an acceleration structure and an intersection test between ray primitives may be one of the most important factors used to determine the ray tracing performance. The traversal of the acceleration structure and the intersection test between the ray primitives may be performed up to a few times to tens of times with respect to each of rays.
The acceleration structure may be a spatial division acceleration structure. The acceleration structure may be a data structure expressed by spatially dividing a scene object to be rendered. A data structure, for example, a grid, a kd-tree, a bounding volume hierarchy (BVH), and the like, may be employed as the acceleration structure.
The above traversal and intersection test may be a process of utilizing at least 70% of calculation amount and occupying at least 90% of a memory bandwidth in ray tracing. Dedicated hardware may be employed for real-time processing of the traversal and the intersection test.